<title>充值中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript" src="#(assets)/js/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="#(path)/assets/js/jquery.tmpl.min.js"></script> 
<script type="text/javascript" src="#(assets)/js/layer/layer.js"></script>
#@checkToken()
<style> 
	body{font-family:"Microsoft YaHei",Arial,Helvetica,sans-serif,"宋体";}
	*{margin:0;padding:0;}
	li{list-style-type:none;}
	select,input{-webkit-appearance:none;border:0px;
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0);   
	}
</style>
<body bgcolor="#f4f5f9" style="margin:0px;">
	<div align="center" style="width:100%;">
	
		<div style="height:20px;font-size:10px;background:#FFF;padding-top:10px;">
			<img style="width:12px;vertical-align:middle;margin-right:5px;color:#868489" src="#(assets)/images/mobile/deposit_1.png"><a>充值资金将进入您的旺进财个人存管账户</a>
		</div>
		<div align="center" style="width:100%;height:70px;background:#FFF;">
			<div align="left" style="height:50px;width:90%;line-height:50px;border-bottom:1px solid #f4f5f9">
			<a>充值金额</a>
			<input id="inputmoney" type="telephone" placeholder="不少于100元" style="width:150px;height:40px;padding-left:10px;"></input>
			</div>
		</div>
		<div align="center" style="width:100%;height:50px;background:#FFF;margin-top:10px;">
			<div align="left" style="height:50px;width:90%;line-height:50px;">
			<div style="float:left;">账户余额</div>
			<div id="availableAmount" style="float:right;color:#fa3048"></div>
			</div>
		</div>
		<!--没有银行卡-->
		<div align="center" style="width:100%;">
			<div align="left" style="font-size:14px;height:40px;width:90%;line-height:40px;color:#868489">
				第三方支付扣款
			</div>
			<!--没有银行卡-->
			<div align="center" hidden style="width:90%;border-radius:10px;overflow:hidden;height:100px;">
				<div style="width:100%;height:30%;background:#ffad6b"></div>
				<div style="width:100%;height:70%;background:#fff;color:#dbdbdb;">
					<div style="line-height:90px;">添加银行卡</div>
				</div>
				<div style="border:2px solid #FFF;background:#f4f5f9;width:40px;height:40px;border-radius:21px;position:relative;top:-85%">
					<img style="width:20px;margin-top:10px;" src="#(assets)/images/mobile/deposit_4.png">
				</div>
			</div>
			<!--有银行卡-->
			<div align="center" style="width:90%;border-radius:10px;overflow:hidden;height:200px;">
				<div style="width:100%;height:30%;background:#ffad6b"></div>
				<div style="width:100%;height:70%;background:#fff;color:#dbdbdb;padding-top:30px;">
					<div class="bank_name" style="line-height:24px;color:#817f80 ;font-size:14px;"></div>
					<div class="bank_account" style="line-height:24px;color:#817f80 ;font-size:14px;"></div>
					<div style="width:96%;border-top:1px solid #f5f5f7;margin-top:5px;">
						<div style="line-height:20px;color:#dcdcdc ;font-size:12px;">提示：充值银行卡为您绑定的投资银行卡</div>
						<div style="line-height:20px;color:#878787;font-size:12px;">单笔限<span id="single"></span>元，单日限<span id="day"></span>元</div>
					</div>
				</div>
				<div style="border:2px solid #FFF;background:#f4f5f9;width:40px;height:40px;border-radius:21px;position:relative;top:-95%">
					<img id="_src" style="width:36px;" src="#(assets)/images/mobile/deposit_4.png">
				</div>
			</div>
		</div>
		 
		 
		
		<div id="deposit_sumbit" align="center" style="height:40px;width:80%;border:1px solid #fc5569;border-radius:5px;color:#fc5569;line-height:40px;margin-top:40px;">立即充值</div>
		
		
		
		<!--支付密码
		<div id="deposit_mengban" hidden  style="background-color:rgba(0,0,0,0.4);position:absolute;top:0;width:100%;height:100%;z-index:10"><div>
		<div align="center" hidden id="deposit_zhifu" style="margin-left:5%;background:#FFF;height:160px;width:90%;position:absolute;top:150px;z-index:600;border-radius:10px;font-size:14px;">
			<div align="center" style="width:100%;line-height:49px;height:49px;border-bottom:1px solid #eee;font-size:16px;">
				<a style="color:#626262"> 输入支付密码</a>
			</div>
			<div align="center" style="width:100%;line-height:30px;height:60px;border-bottom:1px solid #eee">
				<div style="width:100%;height:60px;float:left;">
					<input id="jine" placeholder="支付密码" type="password" style="padding-left:15px;margin-top:15px;border:1px solid #eee;width:70%;height:30px;font-size:14px;color:#fa3048;">
				</div>

			</div>
			<div  align="center" style="width:90%;line-height:49px;height:49px;">
				<div  id="deposit_passtrue" align="center" style="float:left;width:49%;line-height:49px;height:49px;border-right:1px solid #eee"><span >确认</span></div>
				<div  id="deposit_passfalse" align="center" style="float:left;width:49%;line-height:49px;height:49px;"><span >取消</span></div>
			</div>
		</div>
		-->
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> 
<script>
var url = "#(path)/card/mainCard?token=#(session.token??)";
$.getJSON(url, function(datalist) {
	console.log(datalist);
	var datainfo = datalist.data.card;
	$(".bank_account").html(datainfo.bank_account.substring(0, 4) + " ******** " + datainfo.bank_account.substring(12, 16));
	$(".bank_name").html(datainfo.bank_name); 
	$("#day").html(datainfo.day);
	$("#single").html(datainfo.single);
	var _src = "#(assets)/images/mobile/bank/" + datainfo.bank_code + ".png";
	$("#_src").attr('src',_src); 
 
});
var url2 = "#(path)/user/benefit?token=#(session.token??)";
$.getJSON(url2, function(datalist1) {
	console.log(datalist1);
	var datainfo1 = datalist1.data;
	$("#availableAmount").html(datainfo1.availableAmount);
});
$("#deposit_sumbit").click(function(){
	$("#deposit_mengban").show();
	$("#deposit_zhifu").show();
	var money_true = $("#inputmoney").val();
	var ip_l=returnCitySN["cip"];
	var url3 = "#(path)/deposit?token=#(session.token??)&amount="+money_true+"&ip="+ip_l;
	$.getJSON(url3, function(datalist3) {
		console.log(datalist3);
		if(datalist3.code=='success'){
			window.location.href=datalist3.data.url;
		}else{
			layer.msg(datalist3.msg,{icon:2,time:1000}); 
		}
	});
});


</script>
	


</body>